﻿@model IEnumerable<VehicleManagement.Models.QuarterCost>
@{
    ViewBag.Title = "车辆事故费用";
}

<link href="../../Content/css/costreport/visualize.css" rel="stylesheet" type="text/css" />
<link href="../../Content/css/costreport/reportimage.css" rel="stylesheet" type="text/css" />
@Html.Partial("_PartviewFinanMannav")
<div class="content bc">
    <div class="content_link_warn f12">
        你当前的位置：财务管理&gt&gt &nbsp;&nbsp;财务报表&gt&gt &nbsp;&nbsp;
    </div>
    <div class="content_right fr" id="rightcontent" style="width: 941px;">
        <div class="report_left fl">
            <h3 class="report_left_topitem">
                车辆事故费用报表
            </h3>
            <table>
                <thead>
                    <tr>
                        <td>
                            季度
                        </td>
                        <th scope="col">
                            一
                        </th>
                        <th scope="col">
                            二
                        </th>
                        <th scope="col">
                            三
                        </th>
                        <th scope="col">
                            四
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <th scope="row">
                            总费用(元)
                        </th>
                        @{
                            bool hasOne = false;
                            foreach (var item in Model)
                            {
                                if (item.Quarter == 1)
                                {
                            <td>@Html.DisplayFor(modelItem => item.Cost)
                            </td>
                           hasOne = true;
                           break;
                                }
                            }
                            if (hasOne == false)
                            {
                            <td>
                                0.00
                            </td>
                            }
                            hasOne = false;
                        }
                        @{
                            bool hasTwo = false;
                            foreach (var item in Model)
                            {
                                if (item.Quarter == 2)
                                {
                            <td>@Html.DisplayFor(modelItem => item.Cost)
                            </td>
                           hasTwo = true;
                           break;
                                }
                            }
                            if (hasTwo == false)
                            {
                            <td>
                                0.00
                            </td>
                            }
                            hasTwo = false;
                        }
                        @{
                            bool hasThree = false;
                            foreach (var item in Model)
                            {
                                if (item.Quarter == 3)
                                {
                            <td>@Html.DisplayFor(modelItem => item.Cost)
                            </td>
                           hasThree = true;
                           break;
                                }
                            }
                            if (hasThree == false)
                            {
                            <td>
                                0.00
                            </td>
                            }
                            hasThree = false;
                        }
                        @{
                            bool hasFour = false;
                            foreach (var item in Model)
                            {
                                if (item.Quarter == 4)
                                {
                            <td>@Html.DisplayFor(modelItem => item.Cost)
                            </td>
                           hasFour = true;
                           break;
                                }
                            }
                            if (hasFour == false)
                            {
                            <td>
                                0.00
                            </td>
                            }
                            hasFour = false;
                        }
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="report_right fl">
            <ul>
                <li><span class="label">选择车辆</span> <span>
                    <select name="selectCar" class="selectCar">
                        <option value="AllCar">公司所有车辆</option>
                    </select>
                </span></li>
                <li><span class="label">选择视图</span> <span>
                    <select name="selectReport" class="selectReport">
                        <option value="RepairCost">车辆维修</option>
                        <option value="AddOilCost">车辆加油</option>
                        <option value="Accident" selected="selected">车辆事故</option>
                        <option value="AllQuarterCost">统计全部</option>
                    </select>
                </span></li>
                <li><span class="label">选择年份</span> <span>
                    <select name="selectYear" class="selectYear">
                    </select>
                </span></li>
                <li style="margin: 5px 0 0 35px;"><span>
                    <input class="checkReport" type="button" value="查看" style="width: 70px; height: 28px;
                        font: 15px/28px 微软雅黑;" />
                </span></li>
            </ul>
        </div>
        <div class="cb">
        </div>
    </div>
    <div class="cb">
    </div>
      </div>
    <script type="text/javascript" src="../../Scripts/CostReport/jquery.min.js"></script>
    <!--[if IE]>
<script type="text/javascript" src="../../Scripts/CostReport/excanvas.compiled.js"></script>
<![endif]-->
    <script type="text/javascript" src="../../Scripts/CostReport/visualize.jQuery.js"></script>
    <script type="text/javascript" src="../../Scripts/CostReport/buildreport.js"></script>
